import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { LayoutComponent } from './layout/layout.component';
import { TodolistComponent } from './todolist/todolist.component';
import { DragTableComponent } from './drag-table/drag-table.component';
import { StreamComponent } from './stream/stream.component';

const routes: Routes = [
  {path: 'login', component: LoginComponent},
  {path: 'layout', component: LayoutComponent, children: [
      { path: 'todolist',  component: TodolistComponent},
      { path: 'drag-table',  component: DragTableComponent},
      { path: 'stream',  component: StreamComponent},
      // { path: 'project',  component: ProjectComponent},
      // { path: 'user',  component: UserComponent},
  ]},
  {path: '**', component: LoginComponent},
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
